<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<body class="gray-bg">
	<div class="wrapper wrapper-content " id="app">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<input id="account_temp" type="hidden" th:value="${keepConsumptionHistory.keepAccountId}">
						<input id="keepConsumptionTypeId_temp" type="hidden" th:value="${keepConsumptionHistory.keepConsumptionTypeId}">
						<form class="form-horizontal m-t" id="signupForm">
							<input id="id" name="id" th:value="${keepConsumptionHistory.id}" type="hidden">
							<div class="form-group">
								<label class="col-sm-3 control-label">收支时间：</label>
								<div class="col-sm-8">
									<input type="text" class="layui-input" name="expensesOrReceiptsTime" id="expensesOrReceiptsTime" th:value="${keepConsumptionHistory.expensesOrReceiptsTime}==null?null:${#dates.format(keepConsumptionHistory.expensesOrReceiptsTime,'yyyy-MM-dd HH:mm:ss')}" placeholder="收支时间" lay-laydate-id="expensesOrReceiptsTime" readonly="readonly">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">账户：</label>
								<div class="col-sm-8">
									<select data-placeholder="--选择账户--" name="account" id="account"
											class="form-control chosen-select chosen-select-account" tabindex="2" required>
										<option value="">--选择账户--</option>
									</select>
								</div>
							</div>

							<div class="form-group" id="consumptionType_div" style="display: none">
								<label class="col-sm-3 control-label">收支类型：</label>
								<div class="col-sm-8">
									<select data-placeholder="--收支类型--" name="consumptionType" id="consumptionType"
											class="form-control chosen-select chosen-select-consumptionType" tabindex="2" disabled="true" required>
										<option value="">--选择收支类型--</option>
										<option value="1" th:selected="${keepConsumptionHistory.consumptionType eq 1}">收入</option>
										<option value="2" th:selected="${keepConsumptionHistory.consumptionType eq 2}">支出</option>
									</select>
								</div>
							</div>

							<div class="form-group"  id="keepConsumptionTypeId_div" style="display: none">
								<label class="col-sm-3 control-label">消费类型：</label>
								<div class="col-sm-8">
									<select data-placeholder="--收支类型--" name="keepConsumptionTypeId" id="keepConsumptionTypeId"
											class="form-control chosen-select chosen-select-keepConsumptionTypeId" tabindex="2" disabled="true" required>
										<option value="">--请选择消费类型--</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">收支金额：</label>
								<div class="col-sm-8">
									<input id="expensesOrReceiptsMoney" name="expensesOrReceiptsMoney" th:value="${keepConsumptionHistory.expensesOrReceiptsMoney}" class="form-control" type="number" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">备注：</label>
								<div class="col-sm-8">
									<input id="notes" name="notes" th:value="${keepConsumptionHistory.notes}" class="form-control" type="text" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<script src="/js/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/keep/history/edit.js"></script>
</body>
</html>
